package com.ncdnapp.core.filter;

import com.ncdnapp.core.tracer.TraceContext;
import org.noear.solon.annotation.Component;
import org.noear.solon.core.handle.Context;
import org.noear.solon.core.handle.Filter;
import org.noear.solon.core.handle.FilterChain;

@Component(index = 1)
public class TraceFilter implements Filter {
    @Override
    public void doFilter(Context ctx, FilterChain chain) throws Throwable {
        TraceContext.start();
        chain.doFilter(ctx);
    }
}
